home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Control Panel Hide NT.xpl < prev    next >
Text File  |  2003-11-27  |  3KB  |  108 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\Visible Icons"
  5. "NAME"="Visible System Icons #2"
  6. "VERSION"="3.01"
  7. "OSVERSION"="0101011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Display "" applet"
  10. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  11. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"=" "
  16. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  17. "COMMENT 3"="See also: MS KB Q207750"
  18.  
  19.  
  20. '******************************************************************
  21. '***                ONLY CHANGE LINES BELOW                    ****
  22. '******************************************************************
  23.  
  24. aryDesc=Array("Network/Dial up","RAS Control","Server Manager","DOS Console","Ports","License manager","PCMCIA / Tape / SCSI","Devices / Services / Server","UPS","MS DTC")
  25. aryCPLs=Array("ncpa.cpl","rascpl.cpl","srvmgr.cpl","console.cpl","ports.cpl","liccpa.cpl","devapps.cpl","srvmgr.cpl","ups.cpl","dtccfg.cpl") 
  26.  
  27. '******************************************************************
  28. sPath="HKCU\Control Panel\Don't Load\"
  29. sFile="CONTROL.INI"
  30. sFileSec="Don't Load"
  31.  
  32.  
  33.  
  34. SUB Plugin_Initialize
  35.  for i=0 to UBound(aryCPLs)
  36.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  37.  next 
  38. END SUB
  39.  
  40. Sub ReadIt(ItemNumber,VAL,Desc)
  41.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  42.  
  43.   If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  44.      'old (win32 1/2) INI style...
  45.      s=IniReadValue(sFile,sFileSec,VAL)
  46.      if len(s)>0 then
  47.         Call SetUIElementEx(ItemNumber,false)
  48.      else
  49.         Call SetUIElementEx(ItemNumber,true)
  50.      end if   
  51.   else
  52.      s=RegReadValue(sPath & VAL)
  53.      if IsEmpty(s)=false then
  54.         Call SetUIElementEx(ItemNumber,false)
  55.      else
  56.         Call SetUIElementEx(ItemNumber,true)
  57.      end if
  58.   end if
  59.  
  60. End Sub
  61. 'Called when the Plugin should validate the Data the user has entered
  62. SUB Plugin_CheckData(ElementIndex)
  63. END SUB
  64.  
  65. 'Called when the Plugin should apply the changes
  66. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  67.  for i=0 to UBound(aryCPLs)
  68.      Call WriteIt(i+1,aryCPLs(i)) 
  69.  next 
  70.  
  71.  Call IndicateSettingChange()
  72. END SUB
  73.  
  74. Sub WriteIt(ITM,VAL)
  75.  b=GetUIElementEx(ITM)
  76.  if b=true then
  77.     'Display it
  78.  
  79.     If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  80.        'win32 1/2
  81.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  82.     else
  83.        s=RegReadValue(sPath & VAL)
  84.        if IsEmpty(s)=false then
  85.           Call RegDeleteValue(sPath & VAL)
  86.        end if
  87.     end if
  88.  
  89.  else
  90.    'Hide it
  91.    
  92.    If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  93.       'win32 1/2
  94.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  95.    else
  96.       Call RegWriteValue(sPath & VAL,"1",1) 
  97.    end if
  98.  
  99.  end if   
  100. End Sub
  101.  
  102.  
  103. 'Called when the Plugin is about to be removed from memory
  104. SUB Plugin_Terminate
  105. END SUB
  106.  
  107.  
  108.